package domain

import (
	"gorm.io/plugin/soft_delete"
	"time"
)

type BaseDomain struct {
	ID uint `json:"id" gorm:"primary_key"`
	// 创建时默认填充该字段
	CreatedAt time.Time `json:"create_time" gorm:"column:create_time"`
	// 更新时默认填充该字段
	UpdatedAt time.Time `json:"update_time" gorm:"column:update_time"`
	CreateBy  string    `json:"create_by" gorm:"column:create_by"`
	UpdateBy  string    `json:"update_by" gorm:"column:update_by"`
	// 软删除
	IsDelete soft_delete.DeletedAt `json:"is_delete" gorm:"column:is_delete;softDelete:flag"`
}
